package fe

import (
	. "starsine.cn/appTpl/cmn/defs"
	"starsine.cn/appTpl/cmn/logs"
	"starsine.cn/appTpl/svclog/src/fe/chan2client"
	"starsine.cn/appTpl/svclog/src/fe/server"
	"starsine.cn/appTpl/svclog/src/fe/token"
	"starsine.cn/appTpl/svclog/src/fe/ws-server"
)

func Start(appCtxt *AppContext) {
	ws.Start(appCtxt)
	token.Start()
	chan2client.Start()

	err := server.Start(appCtxt)
	if err != nil {
		logs.Errorf("server.Start fail, err: %s", err)
		panic("CreateApiServer fail")
	}

	logs.Infof("fe start")
}
